package com.lz.PublisherEventTest;

import com.lz.PublisherEventTest.event.NewEvent;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * 测试spring的事件发布机制
 */
@SpringBootApplication
public class PublisherEventApp {
    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(PublisherEventApp.class, args);
        context.publishEvent(new NewEvent(context));
    }
}
